import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

// 定义组件懒加载
const Rungroup = () => import('@/views/rungroup/').then(m => m.default)
const RunInfo = () => import('@/views/run/').then(m => m.default)
const Contract = () => import('@/views/contract/').then(m => m.default)
const Ruler = () => import('@/views/contract/ruler').then(m => m.default)
const Support = () => import('@/views/contract/support').then(m => m.default)
const Share = () => import('@/views/share/').then(m => m.default)

export default new Router({
  // mode: 'history',
  // linkActiveClass: 'activeRouter',
  routes: [
    {
      path: '/rungroup',
      name: 'Rungroup',
      component: Rungroup,
      meta: {
        title: '跑团详情'
      }
    },
    {
      path: '/run',
      name: 'RunInfo',
      component: RunInfo,
      meta: {
        title: '跑步详情'
      }
    },
    {
      path: '/contract',
      name: 'Contract',
      component: Contract,
      meta: {
        title: '约定跑详情'
      }
    },
    {
      path: '/contract/ruler',
      name: 'Ruler',
      component: Ruler,
      meta: {
        title: '约定跑规则'
      }
    },
    {
      path: '/support',
      name: 'Support',
      component: Support,
      meta: {
        title: '赞助跑班'
      }
    },
    {
      path: '/share',
      name: 'Share',
      component: Share,
      meta: {
        title: 'RunStep分享'
      }
    }
  ]
})
